<?php
$baseUrl = Yii::app()->request->baseUrl;
?>
<section id="mainCarousel">
    <div class="row">
        <div class="span8">
            <div class="well bg">
                <div id="myCarousel" class="carousel slide" >
                    <div class="carousel-inner">
                        <div class="item active">
                            <a href=""><img src="<?php echo $baseUrl ?>/images/bombaytakeaway.jpg" alt="#" ></a>
                            <div class="carousel-caption" style="text-align:right">
                                <h1><a style="text-decoration:none" href="http://bombaytakeawayclub.com/menu.php">10% off <br>on Order<br>Online </a></h1>

                            </div>
                        </div>
                        <div class="item">
                            <a href=""><img src="<?php echo $baseUrl ?>/images/spices.jpg" alt="#" ></a>
                            <div class="carousel-caption">
                                <h1>Spices  </h1>
                                <p class="safe"> The ground spices we use every day in house.</p>
                                <br>
                                <br>
                            </div>
                        </div>
                        <div class="item">
                            <a href=""><img src="<?php echo $baseUrl ?>/images/freeDelivery.jpg" alt="#" ></a>
                            <div class="carousel-caption">
                                <h1>Free Delivery!</h1>
                                <p> Minimum online order £10.</p>
                                <br>
                            </div>
                        </div>

                        <div class="item">
                            <a href=""><img src="<?php echo $baseUrl ?>/images/FreeWine.jpg" alt="#" ></a>
                            <div class="carousel-caption">
                                <h1>Free wine!</h1>
                                <p> When your order is £50 or more.</p>
                                <br>
                                <ul>
                                    <li>3 Miles radius free delivery.</li>
                                    <li>Special free wine.</li>
                                    <li>with Special Delivery.</li>
                                </ul>

                            </div>
                        </div>	 

                    </div> 		</div>
            </div>
        </div>
        <div class="span4 bg">
            <div class="brandBorder well cntr">
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active">
                        <a data-toggle="tab" href="#home">Tin mới</a>
                    </li>
                    <li class="">
                        <a data-toggle="tab" href="#profile">Tin khuyến mãi</a>
                    </li>
                </ul>
                <div id="myTabContent" class="tab-content">
                    <div id="home" class="tab-pane active">
                        <div class="media">
                            <a class="pull-left" href="#">
                                <img class="media-object" data-src="holder.js/64x64">
                            </a>
                            <div class="media-body">
                                Raw denim you probably haven't heard of them jean shorts Austin.
                            </div>
                        </div>
                        <div class="media">
                            <a class="pull-left" href="#">
                                <img class="media-object" data-src="holder.js/64x64">
                            </a>
                            <div class="media-body">
                                Raw denim you probably haven't heard of them jean shorts Austin.
                            </div>
                        </div>
                        <div class="media">
                            <a class="pull-left" href="#">
                                <img class="media-object" data-src="holder.js/64x64">
                            </a>
                            <div class="media-body">
                                Raw denim you probably haven't heard of them jean shorts Austin.
                            </div>
                        </div>
                        <div class="media">
                            <a class="pull-left" href="#">
                                <img class="media-object" data-src="holder.js/64x64">
                            </a>
                            <div class="media-body">
                                Raw denim you probably haven't heard of them jean shorts Austin.
                            </div>
                        </div>
                    </div>
                    <div id="profile" class="tab-pane ">
                        <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
                    </div>
                </div>
            </div>

        </div>
    </div>

</section>
<?php
$baseUrl = Yii::app()->request->baseUrl;

foreach ($category as $key => $value) {

    echo '<ul class="nav nav-tabs"><li>' . Chtml::link($value->name, $value->link, array('class' => 'active')) . '</li>';
    $findCategory = $this->findCategory($value->id);
    foreach ($findCategory as $item) {
        echo '<li>' . Chtml::link($item->name, $item->link) . '</li>';
    }
    echo '</ul>';
    $findProduct = $this->findProduct($value->id);
    echo '<ul class="thumbnails" >';
    foreach ($findProduct as $data) {
        echo $this->renderPartial('/product/_view', array('data' => $data));
    }
    echo '</ul>';
}
?>
